-
Notifications
You must be signed in to change notification settings - Fork 132
Add rate limit handling to embedders #425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just worried about the tests, if you have some time to explain. The other comments are marginal and non blocking.
|
||
def is_rate_limit_error(exception: Exception) -> bool: | ||
"""Check if an exception is a rate limit error from any LLM provider. | ||
"""Check if an exception is a rate limit error from any LLM provider or embedder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think we can move this file somewhere else now that it's not only used for LLMs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I thought about that, but it would be a breaking change. unless we believe most people aren’t calling the rate limit handler directly and are just relying on the default one. I’m fine with moving it, but I wanted to point out the potential drawback.
Description
This PR extends the rate limiting functionality (previously available only for LLMs) to all embedding providers, and ensures consistent error handling
Type of Change
Complexity
Low
Complexity:
How Has This Been Tested?
Checklist
The following requirements should have been met (depending on the changes in the branch):